home *** CD-ROM | disk | FTP | other *** search
/ POINT Software Programming / PPROG1.ISO / pascal / swag / mouse.swg / 0018_Change Graphic Mouse Curs.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-02-03  |  1.8 KB  |  59 lines

  1. {
  2.  DR> Hello I was wondering how I might be able to load a batch
  3.  DR> file under Turbo Pascal. I was also wondering how to
  4.  DR> change how the mouse symbol looks like when you install
  5.  DR> the mouse in your programs. Thank you.
  6. }
  7. Type
  8.         CursorData  = Array [1..32] of Word;
  9.  
  10.         ArrowMask : CursorData = ($7fff,$3fff,$1fff,$0fff,
  11.                                   $07ff,$03ff,$01ff,$00ff,
  12.                                   $007f,$03ff,$03ff,$29ff,
  13.                                   $71ff,$f0ff,$faff,$f8ff,
  14.  
  15.                                   $8000,$C000,$A000,$9000,
  16.                                   $8800,$8400,$8200,$8100,
  17.                                   $8f80,$9400,$b400,$d200,
  18.                                   $8a00,$0900,$0500,$0700);
  19.  
  20.         HourGlassMask : CursorData = ($0000,$0000,$0000,$c003,
  21.                                       $e007,$f00f,$F81F,$fc3f,
  22.                                       $fc3F,$F81F,$F00F,$e007,
  23.                                       $c003,$0000,$0000,$0000,
  24.  
  25.                                       $0000,$7ffe,$0000,$1ff8,
  26.                                       $0ff0,$0000,$0000,$0000,
  27.                                       $0180,$0340,$07e0,$0e78,
  28.                                       $1818,$0000,$7ffe,$0000);
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. Var
  38.         Regs    : Registers;
  39.  
  40.  
  41.  
  42. Procedure SetMouseCursor(CursorMask : CursorData);
  43.  
  44. Begin
  45.         Regs.AX := $0009;
  46.         Regs.BX := $0004;
  47.         Regs.CX := $0004;
  48.         Regs.ES := Seg(CursorMask);
  49.         Regs.DX := Ofs(CursorMask);
  50.         Intr($33,Regs);
  51. End;
  52.  
  53.  
  54.  
  55. Here's a little routine I used to change my cursor from an arrow to an
  56. hour-glass and back.... You can design your own cursors by following my
  57. examples. The First 16 Words of the array are the cursor the next 16 are
  58. the mask.
  59.